import 'package:flutter/material.dart';

class Label extends StatelessWidget {
  final String text;
  const Label(this.text);
  @override
  Widget build(BuildContext context) {
    return Text(
      this.text,
      style: TextStyle(
          fontSize: 18.0,
          fontWeight: FontWeight.w300,
          color: Color.fromARGB(255, 0, 0, 0),
          decorationColor: Color.fromARGB(255, 0, 0, 0),
          decoration: TextDecoration.none),
    );
  }
}

class ImageDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
        color: const Color.fromARGB(255, 255, 255, 255),
        child: Center(
            child: Column(mainAxisSize: MainAxisSize.min, //最小主轴高度
                children: <Widget>[
              Label('network-网络加载'),
              Image.network(
                  'https://cdn.jsdelivr.net/gh/flutterchina/website@1.0/images/flutter-mark-square-100.png'),
            ])));
  }
}
